package com.lzh.persevere.utils;

import java.util.Random;

public class VerificationCodeGenerator {
    public static String generateNumericCode(int length) {
        Random random = new Random();
        StringBuilder code = new StringBuilder();
        for (int i = 0; i < length; i++) {
            code.append(random.nextInt(10)); // 生成0-9的随机数字
        }
        return code.toString();
    }

    public static void main(String[] args) {
        String code = generateNumericCode(6);
        System.out.println("6位数字验证码: " + code);
    }
}